cameraControlGet
Type
function
Summary
Gets the value of a property of a camera control created using cameraControlCreate.
Syntax
cameraControlGet ( <controlName>, <propertyName> )
Description
Use the cameraControlGet function to get the value of properties of a camera control created with cameraControlCreate.
The propertyName is one of the following:
- "rect": the bounds of the control, relative to the top-left of the card. For example "0,0,100,100".
- "visible": set to true or false to determine whether the control should be displayed.
- "devices": Provides a comma-separated list of available camera devices.
- "default"
- "front"
- "back"
- "device": Specifies which camera device to use.
- "default"
- "front"
- "back"
- "videoDevices": Provides a return-delimited list of available video input devices. Each line consists of a unique ID and device name, separated by a comma.
- "audioDevices": Provides a return-delimited list of available audio input devices. Each line consists of a unique ID and device name, separated by a comma.
- "muxedDevices": Provides a return-delimited list of available combined video and audio input devices. Each line consists of a unique ID and device name, separated by a comma.
- "videoDevice": Specifies the ID of the device to use for video input, or empty if a video input device has not been selected.
- "audioDevice": Specifies the ID of the device to use for audio input, or empty if an audio input device has not been selected.
- "flashModes": Provides a comma-separated list of flash modes available for the current camera device.
- "on": Always use the camera flash.
- "off": Never use the camera flash.
- "auto": Let the camera hardware decide whether or not to use the camera flash.
- "flashMode": Specifies whether or not to use the camera flash.
- "on": Always use the camera flash.
- "off": Never use the camera flash.
- "auto": Let the camera hardware decide whether or not to use the camera flash.
- "exposureModes": Provides a comma-separated list of exposure modes available for the current camera device.
- "locked": Don't adjust the camera exposure.
- "auto": Make an automatic adjustment to the camera exposure when capturing begins.
- "continuous": Make continuous automatic adjustments to the camera exposure during capture.
- "exposureMode": Specifies how the exposure of the camera should be adjusted.
- "locked": Don't adjust the camera exposure.
- "auto": Make an automatic adjustment to the camera exposure when capturing begins.
- "continuous": Make continuous automatic adjustments to the camera exposure during capture.
- "focusModes": Provides a comma-separated list of focus modes available for the current camera device.
- "locked": Don't adjust the camera focus.
- "auto": Make an automatic adjustment to the camera focus when set.
- "autoSmooth": Make a gradual automatic adjustment to the camera focus when set.
- "macro": Make an automatic adjustment to the camera focus when set, focusing on objects close to the camera.
- "macroSmooth": Make a gradual automatic adjustment to the camera focus when set, focusing on objects close to the camera.
- "infinity": Set the camera focal point to the maximum distance. Typically used to photograph distant objects.
- "continuous": Make continuous automatic adjustments to the camera focus during capture.
- "continuousSmooth": Continuously adjust the focus making gradual changes that are less noticeable during video capture.
- "extended": Allows for a greater distance between the farthest & nearest objects that remain in focus.
- "focusMode": Specifies how the focus of the camera should be adjusted.
- "locked": Don't adjust the camera focus.
- "auto": Make an automatic adjustment to the camera focus when set.
- "autoSmooth": Make a gradual automatic adjustment to the camera focus when set.
- "macro": Make an automatic adjustment to the camera focus when set, focusing on objects close to the camera.
- "macroSmooth": Make a gradual automatic adjustment to the camera focus when set, focusing on objects close to the camera.
- "infinity": Set the camera focal point to the maximum distance. Typically used to photograph distant objects.
- "continuous": Make continuous automatic adjustments to the camera focus during capture.
- "continuousSmooth": Continuously adjust the focus making gradual changes that are less noticeable during video capture.
- "extended": Allows for a greater distance between the farthest & nearest objects that remain in focus.
- "whitebalanceModes": Provides a comma-separated list of white-balance modes available for the current camera device.
- "locked": Don't adjust the white-balance focus.
- "auto": Make an automatic adjustment to the camera white-balance when capturing begins.
- "continuous": Make continuous automatic adjustments to the camera white-balance during capture.
- "whitebalanceMode": Specifies how the white-balance of the camera should be adjusted.
- "locked": Don't adjust the white-balance focus.
- "auto": Make an automatic adjustment to the camera white-balance when capturing begins.
- "continuous": Make continuous automatic adjustments to the camera white-balance during capture.
- "qualityPresets": Provides a comma-separated list of preset quality settings available for the current camera device. On Mac and iOS the preset names are defined by the AVFoundation frameword. On Windows the preset names are in the form
widthxheight|frame duration in 100 nanosecond units|bit rate in bits per second
. - "qualityPreset" : Specifies which of the available preset camera quality settings to use.
- "minFrameRate" : Request that the camera not use a recording framerate lower than the given value. Set to zero to remove this restriction.
- "maxFrameRate" : Request that the camera not use a recording framerate higher than the given value. Set to zero to remove this restriction.
- "maximumZoomFactor" : Provides the highest value that the zoom of the current camera device can be set to.
- "zoomFactor" : Specifies the magnification of the camera.
Parameters
Name | Type | Description |
---|---|---|
controlName | The name of the control. | |
propertyName | enum | The property to get.
|
Examples
put cameraControlGet(tControl, "visible") into tVisibility
put cameraControlGet("myControlName", "devices") into tDeviceList
if "front" is among the items of tDeviceList then
cameraControlSet("myControlName", "device", "front")
end if
Related
command: cameraControlDelete, cameraControlDo, cameraControlCreate, cameraControlSet
function: cameraControls, cameraControlTarget
Compatibility and Support
Introduced
LiveCode 7.1
OS
mac
windows
ios
android